﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Peninsula.Web.Areas.Backstage.Models.Store
{
    public class StoreCreateOrEditModel:UpdateModel
    {
        public StoreCreateOrEditModel() {
            Percenttage = 0.00;
        }
        [Required(ErrorMessage ="必须填写")]
        [StringLength(50)]
        [DisplayName("店面名称")]
        public string Name { get; set; }

        [Required(ErrorMessage = "必须填写")]
        //[RegularExpression(@"^[\da-zA-Z]+$|^[\u4e00-\u9fa5]{0,}$", ErrorMessage = "含有特殊字符")]
        [StringLength(50)]
        [DisplayName("店面详细地址")]
        public string Address { get; set; }

        [Required(ErrorMessage = "必须填写")]
        [StringLength(50)]
        [DisplayName("店面联系人")]
        public string StoreCotactPeople { get; set; }


        [Required(ErrorMessage = "必须填写")]
        [StringLength(50)]
        [DisplayName("店面联系方式")]
        [RegularExpression(@"^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$", ErrorMessage = "手机号码格式错误")]
        public string StoreTel { get; set; }

        [Required(ErrorMessage = "必须填写")]
        [DisplayName("支付百分比")]
        public double Percenttage{ get; set; }
    }
}